<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="<%=request.getContextPath()%>/static/js/jquery-1.8.3.js"></script>
    <script>
        $(function(){
            $("#submitBtn").click(function () {
                var telephone=$("#telephone").val();
                var password=$("#password").val();
                console.log({telephone:telephone,password:password});
                console.log(JSON.stringify({telephone:telephone,password:password}));
                $.ajax({
                    url:"user/addUser",
                    type:"post",
                    data:JSON.stringify({telephone:telephone,password:password}),
                    contentType:"application/json"
                });
            });
        });
    </script>
</head>
<body>
    <input type="text" id="telephone">
    <input type="text" id="password">
    <input type="button" value="提交" id="submitBtn">
</body>
</html>
